﻿module Sustainalytics.Common {

    import Common = Sustainalytics.Common;

    angular.module('shell').factory('companyReportsFactory', ['$http', 'staticObjects', ($http, staticObjects: Common.IStaticObjects) => {
        var urlBase = staticObjects.apiBaseUrl + 'companyreports';
        var reportsFactory: IReportsFactory = {
            getReport: () => $http.post(urlBase + "/getreportinfo"),
            generateReport: filters => $http.post(urlBase + "/generate", filters),
            cancelReport: () => $http.post(urlBase + "/cancel"),
            cancelReportNotification: () => $http.post(urlBase + "/cancelReportNotification")
        };
        return reportsFactory;
    }]);
}